export const LocalStorageName = 'USER_INFO';
export const LocalStorageTokenName = 'USER_INFO_TOKEN';
export const EnterpriseCode = 'ENTERPPRISE_CODE';

export const getUserLocalStorage = () => {
  const userInfo: any = localStorage.getItem(LocalStorageName);
  return JSON.parse(userInfo);
};

export const setUserLocalStorage = (data: any) => {
  localStorage.setItem(LocalStorageName, JSON.stringify(data));
};

export const getUserTokenLocalStorage = () => {
  return localStorage.getItem(LocalStorageTokenName);
};

export const removeLocalStorageTokenName = () => {
  localStorage.removeItem(LocalStorageTokenName);
};
export const removeUserLocalStorage = () => {
  localStorage.removeItem(LocalStorageName);
};
